﻿<%@ Page Title="Thống kê tin nhắn" Language="C#" MasterPageFile="~/App_MasterPages/Aquarius.Master"
    AutoEventWireup="true" CodeBehind="SmsStatistics.aspx.cs" Inherits="PanasonicWarranty.UI.SmsStatistics"
    EnableEventValidation="false"  %>

<%@ Register Src="../UserControl/ucPaging.ascx" TagName="ucPaging" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CssContent" runat="server">
    <style type="text/css">
        #searching span{ width: 160px;display: inline-block;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            DatePicker("txtFromDate,txtToDate");
        });
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row-fluid">
        <div class="span12">
            <div class="head">
                <div class="isw-grid">
                </div>
                <h1>Tham số báo cáo</h1>
                <div class="clear">
                </div>
            </div>
            <div class="block-fluid" style="padding: 10px 0px 5px 10px">
                <table width="100%" cellspacing="0" cellpadding="0" class="">
                    <tbody>
                        <tr>
                            <td>Tên báo cáo</td>
                            <td>
                                <asp:DropDownList ID="ddlStatisticType" runat="server">
                                    <asp:ListItem Value="1">Báo cáo tổng hợp số lượng tin nhắn</asp:ListItem>
                                    <asp:ListItem Value="2">Thống kê lưu lượng tin nhắn</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>Từ ngày</td>
                            <td>
                                <asp:TextBox ID="txtFromDate" runat="server" />
                                &nbsp;&nbsp;&nbsp;Tới ngày&nbsp;
                                <asp:TextBox ID="txtToDate" runat="server" />
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div style="text-align: center">
                    <asp:Button ID="btnSearch" runat="server" Text="Báo cáo" OnClick="btnSearch_Click"
                        CssClass="btn" />
                </div>
            </div>
        </div>
    </div> 
    <div class="row-fluid">
        <div class="span12">
            <div class="head">
                <div class="isw-grid">
                </div>
                <h1>Statistic</h1>
                <ul class="buttons">
                    <li>
                        <asp:LinkButton CssClass="isw-download" ID="btnExport" runat="server" 
                            ToolTip="Xuất ra file excel" onclick="btnExport_Click"/>
                    </li>
                </ul>
                <div class="clear">
                </div>
            </div>
            <asp:UpdatePanel ID="udpn" runat="server">
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                <div class="block-fluid table-sorting">
                    <div class="dataTables_wrapper" id="tSortable_wrapper">
                        <asp:GridView ID="grvData1" runat="server" 
                            CssClass="dataTables_wrapper table2 dataTable" aria-describedby="tSortable_info"
                            AutoGenerateColumns="false" ShowHeaderWhenEmpty="true" ShowFooter="true" 
                            onrowdatabound="grvData_RowDataBound">
                            <Columns>
                                <asp:BoundField HeaderText="No" DataField="STT" ItemStyle-CssClass="STT" />
                                <asp:BoundField HeaderText="Đại lý" DataField="AgencyName"/>
                                <asp:BoundField HeaderText="DKBH thành công" DataField="WarrantyCount" ItemStyle-HorizontalAlign="Right"/>
                                <asp:BoundField HeaderText="DKGHBH thành công" DataField="WarrantyExtendCount" ItemStyle-HorizontalAlign="Right" />
                                <asp:BoundField HeaderText="Số tin DK sai" DataField="IncorrectCount" ItemStyle-HorizontalAlign="Right"/>
                            </Columns>
                            <FooterStyle Font-Bold="true" HorizontalAlign="Center" />
                        </asp:GridView>
                        <asp:GridView ID="grvData2" runat="server" 
                            CssClass="dataTables_wrapper table2 dataTable" aria-describedby="tSortable_info"
                            AutoGenerateColumns="false" ShowHeaderWhenEmpty="true" ShowFooter="true" 
                            onrowdatabound="grvData_RowDataBound">
                            <Columns>
                                <asp:BoundField HeaderText="No" DataField="STT" ItemStyle-CssClass="STT" />
                                <asp:BoundField HeaderText="Sender Name" DataField="ShortCode" ItemStyle-HorizontalAlign="Center"/>
                                <asp:BoundField HeaderText="MO" DataField="MO"  ItemStyle-HorizontalAlign="Right"/>
                                <asp:BoundField HeaderText="MT thành công" DataField="SuccessMT"  ItemStyle-HorizontalAlign="Right"/>
                                <asp:BoundField HeaderText="MT không thành công" DataField="FailureMT"  ItemStyle-HorizontalAlign="Right" />
                            </Columns>
                            <FooterStyle Font-Bold="true" HorizontalAlign="Center" />
                        </asp:GridView>
                    </div>
                </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>
    <asp:UpdateProgress ID="udprogress" DisplayAfter="1" runat="server">
        <ProgressTemplate>
            <div class="ui-widget-overlay ui-front">
                <img src='<%=ResolveUrl("~/images/loading.gif")%>' alt="Loading..." style="position: fixed; top: 50%;
                    left: 50%" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>
